<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Collision Checker: cpp/collision/src/serialize/serialize_sphere.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li><li class="navelem"><a class="el" href="dir_0bc2acc18702bc40f3a0aa3bc19285f7.html">src</a></li><li class="navelem"><a class="el" href="dir_ff67b0b1975c78e2aeeef391b01d4332.html">serialize</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">serialize_sphere.cc</div>  </div>
</div><!--header-->
<div class="contents">
<a href="serialize__sphere_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//*  Author: Vitaliy Rusinov</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="serialize_8h.html">collision/serialize/serialize.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#if ENABLE_SERIALIZER</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sphere_8h.html">collision/narrowphase/sphere.h</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">serialize</a> {</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;ICollisionObjectExport *exportObject(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_sphere.html">collision::Sphere</a> &amp;sphere) {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> SphereExport(sphere);</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;}</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#aa571772c3244272d081e7b7f7670a476">SphereExport::SphereExport</a>(<span class="keyword">const</span> Sphere &amp;sphere) {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#af053f4dc779ae88b5eb6d11a8de1145f">radius</a> = sphere.radius();</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a70b367807eecd119812fdfc12b68a744">center_x</a> = sphere.center_x();</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a8c129b18d98b1d6382299e5e58bebf1a">center_y</a> = sphere.center_y();</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;}</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;CollisionObject *<a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#acba804150bc93ddef5fc028112a34a94">SphereExport::loadObject</a>(<span class="keywordtype">void</span>) {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> Sphere(<a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#af053f4dc779ae88b5eb6d11a8de1145f">radius</a>,</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;                    Eigen::Vector2d(<a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a70b367807eecd119812fdfc12b68a744">center_x</a>, <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a8c129b18d98b1d6382299e5e58bebf1a">center_y</a>));</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;}</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a06c554f65874b530decd6adac232b2fb">SphereExport::operator()</a>(s11nlite::node_type &amp;dest)<span class="keyword"> const </span>{</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keyword">typedef</span> s11nlite::node_traits TR;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  TR::class_name(dest, <span class="stringliteral">&quot;SphereExport&quot;</span>);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  TR::set(dest, <span class="stringliteral">&quot;radius&quot;</span>, <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#af053f4dc779ae88b5eb6d11a8de1145f">radius</a>);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  TR::set(dest, <span class="stringliteral">&quot;center_x&quot;</span>, <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a70b367807eecd119812fdfc12b68a744">center_x</a>);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  TR::set(dest, <span class="stringliteral">&quot;center_y&quot;</span>, <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a8c129b18d98b1d6382299e5e58bebf1a">center_y</a>);</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;}</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a06c554f65874b530decd6adac232b2fb">SphereExport::operator()</a>(<span class="keyword">const</span> s11nlite::node_type &amp;src) {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keyword">typedef</span> s11nlite::node_traits TR;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#af053f4dc779ae88b5eb6d11a8de1145f">radius</a> = TR::get(src, <span class="stringliteral">&quot;radius&quot;</span>, <span class="keywordtype">double</span>(0));</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a70b367807eecd119812fdfc12b68a744">center_x</a> = TR::get(src, <span class="stringliteral">&quot;center_x&quot;</span>, <span class="keywordtype">double</span>(0));</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <a class="code" href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">m_fields</a>.<a class="code" href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a8c129b18d98b1d6382299e5e58bebf1a">center_y</a> = TR::get(src, <span class="stringliteral">&quot;center_y&quot;</span>, <span class="keywordtype">double</span>(0));</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;}</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;} <span class="comment">// namespace serialize</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;} <span class="comment">// namespace collision</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classcollision_1_1serialize_1_1_sphere_export_html_aa571772c3244272d081e7b7f7670a476"><div class="ttname"><a href="classcollision_1_1serialize_1_1_sphere_export.html#aa571772c3244272d081e7b7f7670a476">collision::serialize::SphereExport::SphereExport</a></div><div class="ttdeci">SphereExport()</div><div class="ttdef"><b>Definition:</b> <a href="sphere__export_8h_source.html#l00011">sphere_export.h:11</a></div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_sphere_export_html_a4af698aafd8f292eb131d9746a7252b8"><div class="ttname"><a href="classcollision_1_1serialize_1_1_sphere_export.html#a4af698aafd8f292eb131d9746a7252b8">collision::serialize::SphereExport::m_fields</a></div><div class="ttdeci">SphereExportStruct m_fields</div><div class="ttdef"><b>Definition:</b> <a href="sphere__export_8h_source.html#l00018">sphere_export.h:18</a></div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_sphere_export_html_acba804150bc93ddef5fc028112a34a94"><div class="ttname"><a href="classcollision_1_1serialize_1_1_sphere_export.html#acba804150bc93ddef5fc028112a34a94">collision::serialize::SphereExport::loadObject</a></div><div class="ttdeci">CollisionObject * loadObject(void)</div></div>
<div class="ttc" id="classcollision_1_1serialize_1_1_sphere_export_html_a06c554f65874b530decd6adac232b2fb"><div class="ttname"><a href="classcollision_1_1serialize_1_1_sphere_export.html#a06c554f65874b530decd6adac232b2fb">collision::serialize::SphereExport::operator()</a></div><div class="ttdeci">virtual bool operator()(s11nlite::node_type &amp;dest) const</div></div>
<div class="ttc" id="structcollision_1_1serialize_1_1_sphere_export_struct_html_a8c129b18d98b1d6382299e5e58bebf1a"><div class="ttname"><a href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a8c129b18d98b1d6382299e5e58bebf1a">collision::serialize::SphereExportStruct::center_y</a></div><div class="ttdeci">double center_y</div><div class="ttdef"><b>Definition:</b> <a href="sphere__export__struct_8h_source.html#l00008">sphere_export_struct.h:8</a></div></div>
<div class="ttc" id="serialize_8h_html"><div class="ttname"><a href="serialize_8h.html">serialize.h</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00020">collision_checker.h:20</a></div></div>
<div class="ttc" id="sphere_8h_html"><div class="ttname"><a href="sphere_8h.html">sphere.h</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html"><div class="ttname"><a href="classcollision_1_1_sphere.html">collision::Sphere</a></div><div class="ttdoc">Circle.</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8h_source.html#l00014">sphere.h:14</a></div></div>
<div class="ttc" id="namespacecollision_1_1serialize_html_aea63e6d672588912102de4dbfc13ba19"><div class="ttname"><a href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">collision::serialize::serialize</a></div><div class="ttdeci">int serialize(const test::BroadphaseFailureCCObj &amp;bf_object, std::ostream &amp;output_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)</div></div>
<div class="ttc" id="structcollision_1_1serialize_1_1_sphere_export_struct_html_af053f4dc779ae88b5eb6d11a8de1145f"><div class="ttname"><a href="structcollision_1_1serialize_1_1_sphere_export_struct.html#af053f4dc779ae88b5eb6d11a8de1145f">collision::serialize::SphereExportStruct::radius</a></div><div class="ttdeci">double radius</div><div class="ttdef"><b>Definition:</b> <a href="sphere__export__struct_8h_source.html#l00006">sphere_export_struct.h:6</a></div></div>
<div class="ttc" id="structcollision_1_1serialize_1_1_sphere_export_struct_html_a70b367807eecd119812fdfc12b68a744"><div class="ttname"><a href="structcollision_1_1serialize_1_1_sphere_export_struct.html#a70b367807eecd119812fdfc12b68a744">collision::serialize::SphereExportStruct::center_x</a></div><div class="ttdeci">double center_x</div><div class="ttdef"><b>Definition:</b> <a href="sphere__export__struct_8h_source.html#l00007">sphere_export_struct.h:7</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
